﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPageContent.master" AutoEventWireup="false" CodeFile="BudgetTransferDtl.aspx.vb" Inherits="BudgetTransferDtl" %>

<%@ Register Src="~/UserControls/DDL.ascx" TagName="DoubleFilteredDropDownList" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/OneFilteredDropDownList.ascx" TagName="OneFilteredDropDownList"
    TagPrefix="uc2" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

    <script type="text/javascript">

        //function __doPostBack(eventTarget, eventArgument) 
        //{
//          if (!form1.onsubmit || (form1.onsubmit() != false)) 
//            {
//                form1.__EVENTTARGET.value = eventTarget;
//                form1.__EVENTARGUMENT.value = eventArgument;
//                form1.submit();
//            }
        //}

        function Confirm(sender, args) {

            //debugger;

            var DeleteButton = $find("<%=rbtnDelete.ClientID %>");
                DeleteButton.set_autoPostBack(false);
                radprompt('Reason For Deleting ?', promptCallBackFn, 330, 160, null, 'Delete Reason', 'Delete');
        }

        function promptCallBackFn(arg) {

            //debugger;

            var DelButton = $find("<%=rbtnDelete.ClientID %>");

            if (arg != null && arg != "") {
                document.getElementById("<%=hdnReason.ClientID %>").value = arg;
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                ajaxManager.ajaxRequestWithTarget("<%= rbtnDelete.UniqueID %>", arg);
                DelButton.set_autoPostBack(true);
            }
            else {
                //radprompt('Reason For Deleting ?', promptCallBackFn, 330, 160, null, 'Delete Reason', '');
                DelButton.set_autoPostBack(false);
            }
        }
    
    </script>

    </telerik:RadScriptBlock>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeaderPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgBudgetTransferDtl">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgBudgetTransferDtl" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadWindowManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
        Transparency="20">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>


    <br /><br />

     <table>
        <tr >
            <td >
                <asp:Label ID="lblManYear" runat="server" SkinID="Mandetory" Text="<%$ Resources:Controls, RequiredValidationText %>" ></asp:Label>
                <asp:Label ID="lblYear" runat="server" meta:ResourceKey="lblYear" ></asp:Label>
            </td>
            <td >
                <telerik:RadNumericTextBox ID="rntbYear" runat="server" Width="170px" MaxLength="4" MaxValue="2200" ValidationGroup="valBudgetTransferHdr"
                 IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" >
                    <NumberFormat DecimalDigits="0" GroupSizes="4" />
                </telerik:RadNumericTextBox>
                <asp:RequiredFieldValidator ID="rfvrntbYear" runat="server" ControlToValidate="rntbYear" ErrorMessage="<%$ Resources:Controls, ErrorMessage %>" ValidationGroup="valBudgetTransferHdr"></asp:RequiredFieldValidator> 
            </td>

            <td >
                <asp:Label ID="lblrtbBTNo" runat="server" meta:ResourceKey="lblrtbBTNo" ></asp:Label>
            </td>
            <td >
                <telerik:RadTextBox ID="rtbBTNo" Width="170px" runat="server" >
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td >
                <asp:Label ID="lblBTDate" runat="server" meta:ResourceKey="lblBTDate" ></asp:Label>
            </td>
            <td>
                <telerik:RadDatePicker runat="server" ID="rdpBTDate" Culture="English (United States)"
                ShowPopupOnFocus="true">
                <DateInput ID="DateInput1" DateFormat="dd/MM/yyyy" runat="server">
                </DateInput></telerik:RadDatePicker>
            </td>

            <td>
                <asp:Label ID="lblRemarks" runat="server" meta:ResourceKey="lblRemarks"></asp:Label>
            </td>
            <td>
                <telerik:RadTextBox ID="rtbRemarks" runat="server" SkinID="Remarks">
                </telerik:RadTextBox>
            </td>
        <td>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="4" style="width:860px">
                <!------------------------------------------------ Details ---------------------------------------------------->
                <telerik:RadGrid ID="rgBudgetTransferDtl" runat="server" GridLines="None" DataSourceID="sdsBudgetTransferDtl"
                    AllowAutomaticDeletes="True" AllowAutomaticInserts="True" ShowFooter="True" AllowAutomaticUpdates="True"
                    Skin="MetroTouch" AllowPaging="True" AutoGenerateColumns="False" GroupPanel-Text="<%$ Resources:MainGrid ,GroupPanelText %>"
                    CellSpacing="0">
                    <MasterTableView Width="100%" Caption="<%$ Resources:MainGrid , LinesCaption %>"
                        CommandItemDisplay="TopAndBottom" DataKeyNames="ID" TableLayout="Fixed" HorizontalAlign="NotSet"
                        DataSourceID="sdsBudgetTransferDtl" NoMasterRecordsText="<%$ Resources:MainGrid , NoMasterRecordsText %>">
                        <CommandItemTemplate>
                            <table>
                                <tr>
                                    <td>
                                        <asp:ImageButton ID="ibtnInitInsert" CommandName="InitInsert" runat="server" ImageUrl="~/Design/images/Grid/AddRecord.gif" />
                                        <asp:LinkButton ID="lbtnInitInsert" runat="server" Font-Size="14px" Text="<%$ Resources:MainGrid , AddNew %>"
                                            CommandName="InitInsert" Visible="true" />&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:ImageButton ID="ibtnEditSelected" CommandName="EditSelected" runat="server"
                                            ImageUrl="~/Design/images/Grid/Edit.gif" />
                                        <asp:LinkButton ID="lbtnEditSelected" runat="server" Font-Size="14px" Text="<%$ Resources:MainGrid , EditSelected %>"
                                            CommandName="EditSelected" Visible="true" />&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:ImageButton ID="ibtnDeleteSelected" CommandName="DeleteSelected" runat="server"
                                            ImageUrl="~/Design/images/Grid/Delete.gif" />
                                        <asp:LinkButton ID="lbtnDeleteSelected" Font-Size="14px" OnClientClick="<%$ Resources:MainGrid , OnClientClickDelete %>"
                                            runat="server" Text="<%$ Resources:MainGrid , DeleteSelected %>" CommandName="DeleteSelected" />&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:ImageButton ID="ibtnRebindGrid" CommandName="RebindGrid" runat="server" ImageUrl="~/Design/images/Grid/Refresh.gif" />
                                        <asp:LinkButton ID="lbtnRebindGrid" Font-Size="14px" runat="server" Text="<%$ Resources:MainGrid , Refresh %>"
                                            CommandName="RebindGrid" />
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        
                        <ColumnGroups>
                            <telerik:GridColumnGroup meta:ResourceKey="From" HeaderStyle-Font-Bold="true" Name="From" HeaderStyle-HorizontalAlign="Center"/>
                            <telerik:GridColumnGroup meta:ResourceKey="To" HeaderStyle-Font-Bold="true" Name="To" HeaderStyle-HorizontalAlign="Center"/>
                        </ColumnGroups>

                        <Columns>
                            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
                                <HeaderStyle Width="30px" />
                                <ItemStyle Width="30px" />
                            </telerik:GridEditCommandColumn>

                            <telerik:GridBoundColumn DataField="ID" SortExpression="ID"
                                UniqueName="ID" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BTID" SortExpression="BTID"
                                UniqueName="BTID" Visible="false">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="FromProgramNo"
                                SortExpression="FromProgramNo" UniqueName="FromProgram" Visible="false"/>
                             <telerik:GridBoundColumn DataField="FromAccountNo"
                                SortExpression="FromAccountNo" UniqueName="FromAccount" Visible="false"/>
                             <telerik:GridBoundColumn DataField="ToProgramNo"
                                SortExpression="ToProgramNo" UniqueName="ToProgram" Visible="false"/>
                            <telerik:GridBoundColumn DataField="ToAccountNo"
                                SortExpression="ToAccountNo" UniqueName="ToAccount" Visible="false"/>

                            <telerik:GridDropDownColumn DataField="FromProgramNo" DataSourceID="odsProgram" meta:ResourceKey="gbcFromProgram"
                                ListTextField="<%$ Resources:SystemResource, Program %>" ListValueField="ProgramNo"
                                UniqueName="FromProgramNo" EnableEmptyListItem="True" ColumnGroupName="From">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </telerik:GridDropDownColumn>
                                                            
                            <telerik:GridDropDownColumn DataField="FromAccountNo" DataSourceID="odsAccount" meta:ResourceKey="gbcFromAccount"
                                ListTextField="<%$ Resources:SystemResource, Account %>" ListValueField="AccountNo"
                                UniqueName="FromAccountNo" EnableEmptyListItem="True" ColumnGroupName="From">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </telerik:GridDropDownColumn>
                           


                            <telerik:GridDropDownColumn DataField="ToProgramNo" DataSourceID="odsProgram" meta:ResourceKey="gbcToProgram"
                                ListTextField="<%$ Resources:SystemResource, Program %>" ListValueField="ProgramNo"
                                UniqueName="ToProgramNo" EnableEmptyListItem="True" ColumnGroupName="To">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </telerik:GridDropDownColumn>
                           
                            <telerik:GridDropDownColumn DataField="ToAccountNo" DataSourceID="odsAccount" meta:ResourceKey="gbcToAccount"
                                ListTextField="<%$ Resources:SystemResource, Account %>" ListValueField="AccountNo"
                                UniqueName="ToAccountNo" EnableEmptyListItem="True" ColumnGroupName="To">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </telerik:GridDropDownColumn>
                            

                            <telerik:GridBoundColumn DataField="Amount" meta:ResourceKey="gbcAmount"
                                SortExpression="Amount" UniqueName="Amount" Visible="true" DataFormatString="{0:###,###.##}">
                                <HeaderStyle Width="75px" />
                                <ItemStyle Width="75px" />
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="<%$ Resources:MainGrid , ConfirmDelete %>"
                                ConfirmTitle="Confirm" ButtonType="ImageButton" CommandName="Delete">
                                <HeaderStyle Width="30px" />
                                <ItemStyle Width="30px" />
                            </telerik:GridButtonColumn>
                        </Columns>
                        <EditFormSettings ColumnNumber="2" EditFormType="Template" CaptionDataField="ID"
                            CaptionFormatString="Edit properties of {0}" InsertCaption="New Line">
                            <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                            <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                                Width="100%" />
                            <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                            <EditColumn ButtonType="ImageButton" InsertText="Insert User" UpdateText="Update record"
                                UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                            </EditColumn>
                            <FormTableButtonRowStyle CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                            <FormTemplate>
                                <table id="Table2" cellspacing="2" cellpadding="1" border="0" rules="none">
                                    <tr>
                                        <td>
                                            <%--<asp:Label ID="lblNewLine" Font-Bold="true" Font-Italic="true" runat="server" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "New Line", "Update Line") %>'
                                                SkinID="KeyLabel"></asp:Label>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblProgram" SkinID="KeyLabel" runat="server" meta:ResourceKey="lblProgram"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblManFromProgram" runat="server" SkinID="Mandetory" Text="<%$ Resources:Controls, RequiredValidationText %>"></asp:Label>
                                            <asp:Label ID="lblFromProgramNo" SkinID="KeyLabel" runat="server" meta:ResourceKey="lblFromProgram"></asp:Label>
                                        </td>
                                        <td>
                                            <uc1:DoubleFilteredDropDownList ID="WUCFromProgram" IsRequired="true" runat="server" DataSourceId="odsProgram"
                                                DataTextField="<%$ Resources:SystemResource, Program %>" DataValueField="ProgramNo" 
                                                SelectedValue='<%# Bind("FromProgramNo") %>' DefaultChoosedItem="ChooseOne" ValidationGroup="valBudgetTransferDtl" />
                                        </td>
                                        <td>
                                            <asp:Label ID="lblManToProgram" runat="server" SkinID="Mandetory" Text="<%$ Resources:Controls, RequiredValidationText %>"></asp:Label>
                                            <asp:Label ID="lblToProgramNo" SkinID="KeyLabel" runat="server" meta:ResourceKey="lblToProgram"></asp:Label>
                                        </td>
                                        <td>
                                            <uc1:DoubleFilteredDropDownList ID="WUCToProgram" IsRequired="true" runat="server" DataSourceId="odsProgram"
                                                DataTextField="<%$ Resources:SystemResource, Program %>" DataValueField="ProgramNo" 
                                                SelectedValue='<%# Bind("ToProgramNo") %>' DefaultChoosedItem="ChooseOne" ValidationGroup="valBudgetTransferDtl" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblAccount" SkinID="KeyLabel" runat="server" meta:ResourceKey="lblAccount"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblManFromAccount" runat="server" SkinID="Mandetory" Text="<%$ Resources:Controls, RequiredValidationText %>"></asp:Label>
                                            <asp:Label ID="lblFromAccountNo" SkinID="KeyLabel" runat="server" meta:ResourceKey="lblFromAccount"></asp:Label>
                                        </td>
                                        <td>
                                            <uc1:DoubleFilteredDropDownList ID="WUCFromAccount" IsRequired="true" runat="server" DataSourceId="odsAccount"
                                                DataTextField="<%$ Resources:SystemResource, Account %>" DataValueField="AccountNo" 
                                                SelectedValue='<%# Bind("FromAccountNo") %>' DefaultChoosedItem="ChooseOne" ValidationGroup="valBudgetTransferDtl" />
                                        </td>

                                        <td>
                                            <asp:Label ID="lblManToAccount" runat="server" SkinID="Mandetory" Text="<%$ Resources:Controls, RequiredValidationText %>"></asp:Label>
                                            <asp:Label ID="lblToAccountNo" SkinID="KeyLabel" runat="server" meta:ResourceKey="lblToAccount"></asp:Label>
                                        </td>
                                        <td>
                                            <uc1:DoubleFilteredDropDownList ID="WUCToAccount" IsRequired="true" runat="server" DataSourceId="odsAccount"
                                                DataTextField="<%$ Resources:SystemResource, Account %>" DataValueField="AccountNo" 
                                                SelectedValue='<%# Bind("ToAccountNo") %>' DefaultChoosedItem="ChooseOne" ValidationGroup="valBudgetTransferDtl" />
                                        </td>

                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblManrntbAmount" runat="server" SkinID="Mandetory" Text="<%$ Resources:Controls, RequiredValidationText %>"></asp:Label>
                                            <asp:Label ID="lblrntbAmount" runat="server" meta:ResourceKey="lblAmount" SkinID="KeyLabel"></asp:Label>
                                        </td>
                                        <td>
                                            <telerik:RadNumericTextBox ID="rntbAmount" runat="server" ValidationGroup="valBudgetTransferDtl"
                                                IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true"
                                                Text='<%# Bind("Amount") %>'>
                                                <NumberFormat DecimalDigits="2" GroupSizes="4" />
                                            </telerik:RadNumericTextBox>
                                            <asp:RequiredFieldValidator ID="rfvrntbAmount" runat="server" ControlToValidate="rntbAmount"
                                            ErrorMessage="<%$ Resources:Controls, ErrorMessage %>" ValidationGroup="valBudgetTransferDtl"></asp:RequiredFieldValidator>
                                        </td>
                                        
                                    </tr>
                                    <tr>
                                        <td colspan="6">
                                            <div style="margin-top: 10px">
                                                <telerik:RadButton ID="btnInsert" meta:ResourceKey="btnInsert" Visible='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "True", "False") %>'
                                                    runat="server" CommandName="PerformInsert" Icon-PrimaryIconCssClass="rbOk" CausesValidation="true" ValidationGroup="valBudgetTransferDtl">
                                                </telerik:RadButton>
                                                <telerik:RadButton ID="btnUpdate" meta:ResourceKey="btnUpdate" Visible='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "False", "True") %>'
                                                    runat="server" CommandName="Update" CausesValidation="true" ValidationGroup="valBudgetTransferDtl"
                                                    Icon-PrimaryIconCssClass="rbOk">
                                                </telerik:RadButton>
                                                &nbsp;
                                                <telerik:RadButton ID="btnCancel" meta:ResourceKey="btnCancel" runat="server" CausesValidation="False"
                                                    CommandName="Cancel" Icon-PrimaryIconCssClass="rbCancel" >
                                                </telerik:RadButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </FormTemplate>
                        </EditFormSettings>
                        <CommandItemSettings ExportToPdfText="Export to PDF" />
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" Wrap="True" />
                    </MasterTableView>
                    <ValidationSettings CommandsToValidate="PerformInsert,Update" ValidationGroup="valEditMode" />
                    <ClientSettings AllowDragToGroup="False">
                        <Scrolling AllowScroll="false" ScrollHeight="400px" />
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <FilterMenu EnableTheming="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                </telerik:RadGrid>

                <asp:HiddenField ID="hdnReason" runat="server" />
                <asp:HiddenField ID="hdnBTID" runat="server" />

    <br />
    <br />
    
    <telerik:RadButton ID="btnSave" runat="server" Text="Save" CausesValidation="true"  meta:ResourceKey="btnSave" ValidationGroup="valBudgetTransferHdr" >
                        </telerik:RadButton>
    &nbsp;
    <telerik:RadButton ID="rbtnDelete" runat="server" Text="Delete" OnClientClicking="Confirm" meta:ResourceKey="btnDelete" CausesValidation="false"  >
                        </telerik:RadButton>
    &nbsp;
    <telerik:RadButton ID="btnCancel" runat="server" Text="Cancel"  meta:ResourceKey="btnCancel" CausesValidation="false"  >
                        </telerik:RadButton>

    </td>
    </tr>
    </table>

    <sds:SessionDataSource ID="sdsBudgetTransferDtl" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>"
        SelectCommand="Select * from BudgetTransferDtl WHERE BTID = @BTID"
        DeleteCommand="DELETE FROM [BudgetTransferDtl] WHERE [ID] = ?" 
        InsertCommand="INSERT INTO [BudgetTransferDtl] 
          (BTID,FromProgramNo,FromAccountNo,ToProgramNo,ToAccountNo,Amount)
	    VALUES
          ( @BTID , ?, ? ,?, ?, ?)"
        UpdateCommand="Update BudgetTransferDtl Set
		BTID = @BTID,
		FromProgramNo = @FromProgramNo,
		FromAccountNo = @FromAccountNo,
		ToProgramNo = @ToProgramNo,
		ToAccountNo = @ToAccountNo,
		Amount = @Amount
		Where 
		BTID = @BTID
		FromProgramNo = ?,
		FromAccountNo = ?o,
		ToProgramNo = ?,
		ToAccountNo = ?,
		Amount = ? "
        PrimaryKeyFields="ID" OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues"
        ClearSessionOnInitialLoad="True" SessionKey="System.Web.UI.Page_sdsBudgetTransfer">
        <SelectParameters>
            <asp:ControlParameter ControlID="hdnBTID" Name="BTID" PropertyName="Value"
                Type="String" />
        </SelectParameters>
        <UpdateParameters>
            <asp:ControlParameter ControlID="hdnBTID" Name="BTID" PropertyName="Value"
                Type="String" />
            <asp:Parameter Name="FromProgramNo" />
            <asp:Parameter Name="FromAccountNo" />
            <asp:Parameter Name="ToProgramNo" />
            <asp:Parameter Name="ToAccountNo" />
            <asp:Parameter Name="Amount" />
        </UpdateParameters>
        <InsertParameters>
            <asp:ControlParameter ControlID="hdnBTID" Name="BTID" PropertyName="Value"
                Type="String" />
        </InsertParameters>
    </sds:SessionDataSource>


    <asp:ObjectDataSource ID="odsProgram" runat="server" 
        SelectMethod="QueryDatabase" TypeName="DBProgramSP" >
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
            <asp:Parameter DefaultValue="RtvProgram" Name="Operation" Type="String" />
            <asp:Parameter Name="ProgramNo" Type="String" />
            <asp:Parameter Name="ProgramDescAr" Type="String" />
            <asp:Parameter Name="ProgramDescEn" Type="String" />
            <asp:Parameter Name="Level" Type="String" />
            <asp:Parameter Name="isbranch" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    <asp:ObjectDataSource ID="odsAccount" runat="server" SelectMethod="QueryDatabase"
        TypeName="AccountsSP">
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
            <asp:Parameter DefaultValue="RtvAllChildAccounts" Name="Operation" Type="String" />
            <asp:Parameter Name="AccountNo" Type="String" />
            <asp:Parameter Name="AccountNameAr" Type="String" />
            <asp:Parameter Name="AccountNameEn" Type="String" />
            <asp:Parameter Name="ParentID" Type="String" />
            <asp:Parameter Name="Remarks" Type="String" />
            <asp:Parameter Name="AccountType" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>


</asp:Content>

